var mongoose = require("mongoose");
var mongoosePaginate = require("mongoose-paginate");

var schema = new mongoose.Schema({
    cateId: mongoose.Schema.ObjectId,
    filename: String,
    originalname: String,
    encoding: String,
    mimetype: String,
    date: { type: Date, default: Date.now },
    destination: String,
    filename: String,
    path: String,
    size: Number
});
schema.plugin(mongoosePaginate);

module.exports = mongoose.model("Upload", schema);